Data Types

In the protocol, input and output commands are collectively called messages. Each message is a string composed of ASCII characters.

Message Type Description
Input The message that inputs to the receiver
Output The message that is output by the receiver
Input/Output The message that can input to the receiver and also can be output by the receiver

In this protocol, the data in the message contains the following types:

String (STR)

The string consists of up to 32 ASCII characters except ‘\r' and ‘\n', such as GPSL1.

Unsigned Integers (UINT)

Unsigned integers range from 0 to 4294967295, and are defined in both decimal and hexadecimal. A decimal unsigned integer consists of ASCII characters 0 to 9 with a maximum of 10 characters, such as 123, 4291075193. A hexadecimal unsigned integer starts with the ASCII character h or H, followed by a string of 0 to 9 and a to f (or A to F), with a maximum of 8 characters (excluding the starting h or H), such as hE10, hE41BA7C0.

Signed Integers (INT)

Signed integers are composed of the ASCII characters 0 to 9 and a negative sign, in the range of -2147483648 to 2147483647, such as 123217754, -245278. It has 10 characters (excluding the negative sign) at most.

Double-precision Floating-point Data (DOUBLE)

Double-precision floating-point data consists of ASCII characters 0 to 9, a negative sign and decimal points, ranging from -2^1023 to 2^1023, such as 3.1415926, -9024.12367225. It has 20 characters at most.

Unsigned Long Integers (UINT64)

The integer has 16 characters (excluding the starting h or H) at most if it is in hexadecimal.

Symbol Type Length (bit) Range
U8 unsigned char 8 [0, 2^8-1]
S8 signed char 8 [-2^7, 2^7-1]
U16 unsigned short 16 [0, 2^16-1)
S16 signed short 16 [-2^15, 2^15-1]
U32 unsigned long 32 [0, 2^32-1]
S32 signed long 32 [-2^31, 2^31-1]
U64 unsigned long long 64 [0, 2^64-1]
S64 signed long long 64 [-2^63, 2^63-1]
int17 17 bit 2’s complement integer 17 [-2^16, 2^16-1]

results matching ""

    No results matching ""